package top.boycharse.talker;

import org.glassfish.jersey.server.ResourceConfig;
import top.boycharse.talker.provider.AuthRequestFilter;
import top.boycharse.talker.provider.GsonProvider;
import top.boycharse.talker.service.AccountService;

import java.util.logging.Logger;

public class Application extends ResourceConfig {
    private static final Logger LOGGER = Logger.getLogger(Application.class.getName());

    public Application() {

        packages(AccountService.class.getPackage().getName());

        //注册拦截器
        register(AuthRequestFilter.class);

        // 注册Json解析器
        // register(JacksonJsonProvider.class);
        // 替换解析器为Gson
        register(GsonProvider.class);

        // 注册日志打印输出
        register(Logger.class);
    }
}
